import os
import subprocess

from base_class import MyBase

class JobExecutor(MyBase):
	def execute(self, script_path):
		if os.path.exists(script_path):
			self.info('script [%s] begin execute ' % script_path)
			status = subprocess.call("python " + script_path, shell=True)
			self.info('script [%s] been finished. status-[%s]' % (script_path, status))
